<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
                      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
    <title>Using Google Base - Zend Framework Manual</title>

    <link href="../css/shCore.css" rel="stylesheet" type="text/css" />
    <link href="../css/shThemeDefault.css" rel="stylesheet" type="text/css" />
    <link href="../css/styles.css" media="all" rel="stylesheet" type="text/css" />
</head>
<body>
<h1>Zend Framework</h1>
<h2>Programmer's Reference Guide</h2>
<ul>
    <li><a href="../en/zend.gdata.gbase.html">Inglês (English)</a></li>
    <li><a href="../pt-br/zend.gdata.gbase.html">Português Brasileiro (Brazilian Portuguese)</a></li>
</ul>
<table width="100%">
    <tr valign="top">
        <td width="85%">
            <table width="100%">
                <tr>
                    <td width="25%" style="text-align: left;">
                    <a href="zend.gdata.gapps.html">Using Google Apps Provisioning</a>
                    </td>

                    <td width="50%" style="text-align: center;">
                        <div class="up"><span class="up"><a href="zend.gdata.html">Zend_Gdata</a></span><br />
                        <span class="home"><a href="manual.html">Guia de Refer&ecirc;ncia do Programador</a></span></div>
                    </td>

                    <td width="25%" style="text-align: right;">
                        <div class="next" style="text-align: right; float: right;"><a href="zend.gdata.photos.html">Using Picasa Web Albums</a></div>
                    </td>
                </tr>
            </table>
<hr />
<div id="zend.gdata.gbase" class="section"><div class="info"><h1 class="title">Using Google Base</h1></div>
    

    <p class="para">
        The Google Base data <acronym class="acronym">API</acronym> is designed to enable developers to do two
        things:

        <ul class="itemizedlist">
            <li class="listitem">
                <p class="para">
                    Query Google Base data to create applications and mashups.
                </p>
            </li>

            <li class="listitem">
                <p class="para">
                    Input and manage Google Base items programmatically.
                </p>
            </li>
        </ul>
    </p>

    <p class="para">
        There are two item feeds: snippets feed and customer items feeds. The snippets feed contains
        all Google Base data and is available to anyone to query against without a need for
        authentication. The customer items feed is a customer-specific subset of data and only a
        customer/owner can access this feed to insert, update, or delete their own data. Queries are
        constructed the same way against both types of feeds.
    </p>

    <p class="para">
        See <a href="http://code.google.com/apis/base/" class="link external">&raquo; http://code.google.com/apis/base</a>
        for more information about the Google Base <acronym class="acronym">API</acronym>.
    </p>

    <div class="section" id="zend.gdata.gbase.connect"><div class="info"><h1 class="title">Connect To The Base Service</h1></div>
        

        <p class="para">
            The Google Base <acronym class="acronym">API</acronym>, like all GData <acronym class="acronym">API</acronym>s, is based
            off of the Atom Publishing Protocol (APP), an <acronym class="acronym">XML</acronym> based format for
            managing web-based resources. Traffic between a client and the Google Base servers
            occurs over <acronym class="acronym">HTTP</acronym> and allows for both authenticated and
            unauthenticated connections.
        </p>

        <p class="para">
            Before any transactions can occur, this connection needs to be made. Creating a
            connection to the base servers involves two steps: creating an <acronym class="acronym">HTTP</acronym>
            client and binding a <span class="classname">Zend_Gdata_Gbase</span> service instance to that
            client.
        </p>

        <div class="section" id="zend.gdata.gbase.connect.authentication"><div class="info"><h1 class="title">Authentication</h1></div>
            

            <p class="para">
                The Google Base <acronym class="acronym">API</acronym> allows access to both public and private base
                feeds. Public feeds do not require authentication, but are read-only and offer
                reduced functionality. Private feeds offers the most complete functionality but
                requires an authenticated connection to the base servers. There are three
                authentication schemes that are supported by Google Base:
            </p>

            <ul class="itemizedlist">
                <li class="listitem">
                    <p class="para">
                        <b class="firstterm">ClientAuth</b> provides direct username/password
                        authentication to the base servers. Since this scheme requires that users
                        provide your application with their password, this authentication is only
                        recommended when other authentication schemes are insufficient.
                    </p>
                </li>

                <li class="listitem">
                    <p class="para">
                        <b class="firstterm">AuthSub</b> allows authentication to the base servers via
                        a Google proxy server. This provides the same level of convenience as
                        ClientAuth but without the security risk, making this an ideal choice for
                         web-based applications.
                    </p>
                </li>
            </ul>

            <p class="para">
                The <span class="classname">Zend_Gdata</span> library provides support for all three
                authentication schemes. The rest of this chapter will assume that you are familiar
                the authentication schemes available and how to create an appropriate authenticated
                connection. For more information, please see the <a href="zend.gdata.introduction.html#zend.gdata.introduction.authentication" class="link">authentication section</a>
                or the <a href="http://code.google.com/apis/gdata/auth.html" class="link external">&raquo; Authentication
                    Overview in the Google Data <acronym class="acronym">API</acronym> Developer&#039;s Guide</a>.
            </p>
        </div>

        <div class="section" id="zend.gdata.gbase.connect.service"><div class="info"><h1 class="title">Create A Service Instance</h1></div>
            

            <p class="para">
                In order to interact with Google Base, this library provides the
                <span class="classname">Zend_Gdata_Gbase</span> service class. This class provides a common
                interface to the Google Data and Atom Publishing Protocol models and assists in
                marshaling requests to and from the base servers.
            </p>

            <p class="para">
                Once deciding on an authentication scheme, the next step is to create an instance of
                <span class="classname">Zend_Gdata_Gbase</span>. This class takes in an instance of
                <span class="classname">Zend_Http_Client</span> as a single argument. This provides an
                interface for AuthSub and ClientAuth authentication, as both of these creation of a
                special authenticated <acronym class="acronym">HTTP</acronym> client. If no arguments are provided,
                an unauthenticated instance of <span class="classname">Zend_Http_Client</span>
                will be automatically created.
            </p>

            <p class="para">
                The example below shows how to create a Base service class using ClientAuth
                authentication:
            </p>

            <pre class="programlisting brush: php">
// Parameters for ClientAuth authentication
$service = Zend_Gdata_Gbase::AUTH_SERVICE_NAME;
$user = &quot;sample.user@gmail.com&quot;;
$pass = &quot;pa$$w0rd&quot;;

// Create an authenticated HTTP client
$client = Zend_Gdata_ClientLogin::getHttpClient($user, $pass, $service);

// Create an instance of the Base service
$service = new Zend_Gdata_Gbase($client);
</pre>


            <p class="para">
                A Base service using AuthSub can be created in a similar, though slightly more
                lengthy fashion:
            </p>

            <pre class="programlisting brush: php">
/*
 * Retrieve the current URL so that the AuthSub server knows where to
 * redirect the user after authentication is complete.
 */
function getCurrentUrl()
{
    global $_SERVER;

    // Filter php_self to avoid a security vulnerability.
    $php_request_uri =
        htmlentities(substr($_SERVER[&#039;REQUEST_URI&#039;],
                            0,
                            strcspn($_SERVER[&#039;REQUEST_URI&#039;], &quot;\n\r&quot;)),
                     ENT_QUOTES);

    if (isset($_SERVER[&#039;HTTPS&#039;]) &amp;&amp;
        strtolower($_SERVER[&#039;HTTPS&#039;]) == &#039;on&#039;) {
        $protocol = &#039;https://&#039;;
    } else {
        $protocol = &#039;http://&#039;;
    }
    $host = $_SERVER[&#039;HTTP_HOST&#039;];
    if ($_SERVER[&#039;HTTP_PORT&#039;] != &#039;&#039; &amp;&amp;
        (($protocol == &#039;http://&#039; &amp;&amp; $_SERVER[&#039;HTTP_PORT&#039;] != &#039;80&#039;) ||
        ($protocol == &#039;https://&#039; &amp;&amp; $_SERVER[&#039;HTTP_PORT&#039;] != &#039;443&#039;))) {
        $port = &#039;:&#039; . $_SERVER[&#039;HTTP_PORT&#039;];
    } else {
        $port = &#039;&#039;;
    }
    return $protocol . $host . $port . $php_request_uri;
}

/**
 * Obtain an AuthSub authenticated HTTP client, redirecting the user
 * to the AuthSub server to login if necessary.
 */
function getAuthSubHttpClient()
{
    global $_SESSION, $_GET;

    // If there is no AuthSub session or one-time token waiting for us,
    // redirect the user to the AuthSub server to get one.
    if (!isset($_SESSION[&#039;sessionToken&#039;]) &amp;&amp; !isset($_GET[&#039;token&#039;])) {
        // Parameters to give to AuthSub server
        $next = getCurrentUrl();
        $scope = &quot;http://www.google.com/base/feeds/items/&quot;;
        $secure = false;
        $session = true;

        // Redirect the user to the AuthSub server to sign in

        $authSubUrl = Zend_Gdata_AuthSub::getAuthSubTokenUri($next,
                                                             $scope,
                                                             $secure,
                                                             $session);
         header(&quot;HTTP/1.0 307 Temporary redirect&quot;);

         header(&quot;Location: &quot; . $authSubUrl);

         exit();
    }

    // Convert an AuthSub one-time token into a session token if needed
    if (!isset($_SESSION[&#039;sessionToken&#039;]) &amp;&amp; isset($_GET[&#039;token&#039;])) {
        $_SESSION[&#039;sessionToken&#039;] =
            Zend_Gdata_AuthSub::getAuthSubSessionToken($_GET[&#039;token&#039;]);
    }

    // At this point we are authenticated via AuthSub and can obtain an
    // authenticated HTTP client instance

    // Create an authenticated HTTP client
    $client = Zend_Gdata_AuthSub::getHttpClient($_SESSION[&#039;sessionToken&#039;]);
    return $client;
}

// -&gt; Script execution begins here &lt;-

// Make sure http://code.google.com/apis/gdata/reference.html#Queriesthat
// the user has a valid session, so we can record the
// AuthSub session token once it is available.
session_start();

// Create an instance of the Base service, redirecting the user
// to the AuthSub server if necessary.
$service = new Zend_Gdata_Gbase(getAuthSubHttpClient());
</pre>


            <p class="para">
                Finally, an unauthenticated server can be created for use with snippets feeds:
            </p>

            <pre class="programlisting brush: php">
// Create an instance of the Base service using an unauthenticated HTTP client
$service = new Zend_Gdata_Gbase();
</pre>

        </div>
    </div>

    <div class="section" id="zend.gdata.gbase.retrieve"><div class="info"><h1 class="title">Retrieve Items</h1></div>
        

        <p class="para">
            You can query customer items feed or snippets feed to retrieve items. It involves two
            steps, sending a query and iterating through the returned feed.
        </p>

        <div class="section" id="zend.gdata.gbase.retrieve.query"><div class="info"><h1 class="title">Send a Structured Query</h1></div>
            

            <p class="para">
                You can send a structured query to retrieve items from your own customer items feed
                or from the public snippets feed.
            </p>

            <p class="para">
                When retrieving items using the Base <acronym class="acronym">API</acronym>, specially constructed
                query <acronym class="acronym">URL</acronym>s are used to describe what events should be returned.
                The <span class="classname">Zend_Gdata_Gbase_ItemQuery</span> and
                <span class="classname">Zend_Gdata_Gbase_SnippetQuery</span> classes simplify this task by
                automatically constructing a query <acronym class="acronym">URL</acronym> based on provided
                parameters.
            </p>

            <div class="section" id="zend.gdata.gbase.retrieve.query.customeritems"><div class="info"><h1 class="title">Query Customer Items Feed</h1></div>
                

                <p class="para">
                    To execute a query against the customer items feed, invoke
                     <span class="methodname">newItemQuery()</span> and
                     <span class="methodname">getGbaseItemFeed()</span> methods:
                </p>

                <pre class="programlisting brush: php">
$service = new Zend_Gdata_Gbase($client);
$query = $service-&gt;newItemQuery();
$query-&gt;setBq(&#039;[title:Programming]&#039;);
$query-&gt;setOrderBy(&#039;modification_time&#039;);
$query-&gt;setSortOrder(&#039;descending&#039;);
$query-&gt;setMaxResults(&#039;5&#039;);
$feed = $service-&gt;getGbaseItemFeed($query);
</pre>


                <p class="para">
                    A full list of these parameters is available at the <a href="http://code.google.com/apis/base/items-feed.html#QueParameters" class="link external">&raquo; Query
                        parameters section</a> of the Customer Items Feed documentation.
                </p>
            </div>

            <div class="section" id="zend.gdata.gbase.retrieve.query.snippets"><div class="info"><h1 class="title">Query Snippets Feed</h1></div>
                

                <p class="para">
                    To execute a query against the public snippets feed, invoke
                     <span class="methodname">newSnippetQuery()</span> and
                     <span class="methodname">getGbaseSnippetFeed()</span> methods:
                </p>

                <pre class="programlisting brush: php">
$service = new Zend_Gdata_Gbase();
$query = $service-&gt;newSnippetQuery();
$query-&gt;setBq(&#039;[title:Programming]&#039;);
$query-&gt;setOrderBy(&#039;modification_time&#039;);
$query-&gt;setSortOrder(&#039;descending&#039;);
$query-&gt;setMaxResults(&#039;5&#039;);
$feed = $service-&gt;getGbaseSnippetFeed($query);
</pre>


                <p class="para">
                    A full list of these parameters is available at the <a href="http://code.google.com/apis/base/snippets-feed.html#Parameters" class="link external">&raquo; Query
                        parameters section</a> of the Snippets Feed documentation.
                </p>
            </div>
        </div>

        <div class="section" id="zend.gdata.gbase.retrieve.iterate"><div class="info"><h1 class="title">Iterate through the Items</h1></div>
            

            <p class="para">
                Google Base items can contain item-specific attributes such as
                <em class="emphasis">&lt;g:main_ingredient&gt;</em> and <em class="emphasis">&lt;g:weight&gt;</em>.
            </p>

            <p class="para">
                To iterate through all attributes of a given item, invoke
                 <span class="methodname">getGbaseAttributes()</span> and iterate through the results:
            </p>

            <pre class="programlisting brush: php">
foreach ($feed-&gt;entries as $entry) {
  // Get all attributes and print out the name and text value of each
  // attribute
  $baseAttributes = $entry-&gt;getGbaseAttributes();
  foreach ($baseAttributes as $attr) {
    echo &quot;Attribute &quot; . $attr-&gt;name . &quot; : &quot; . $attr-&gt;text . &quot;&lt;br&gt;&quot;;
  }
}
</pre>


            <p class="para">
                Or, you can look for specific attribute name and iterate through the results that
                match:
            </p>

            <pre class="programlisting brush: php">
foreach ($feed-&gt;entries as $entry) {
  // Print all main ingredients &lt;g:main_ingredient&gt;
  $baseAttributes = $entry-&gt;getGbaseAttribute(&quot;main_ingredient&quot;);
  foreach ($baseAttributes as $attr) {
    echo &quot;Main ingredient: &quot; . $attr-&gt;text . &quot;&lt;br&gt;&quot;;
  }
}
</pre>

        </div>
    </div>

    <div class="section" id="zend.gdata.gbase.crud"><div class="info"><h1 class="title">Insert, Update, and Delete Customer Items</h1></div>
        

        <p class="para">
            A customer/owner can access his own Customer Items feed to insert, update, or delete
            their items. These operations do not apply to the public snippets feed.
        </p>

        <p class="para">
            You can test a feed operation before it is actually executed by setting the dry-run flag
            (<var class="varname">$dryRun</var>) to <b><tt>TRUE</tt></b>. Once you are sure that you
            want to submit the data, set it to <b><tt>FALSE</tt></b> to execute the operation.
        </p>

        <div class="section" id="zend.gdata.gbase.crud.insert"><div class="info"><h1 class="title">Insert an Item</h1></div>
            

            <p class="para">
                Items can be added by using the  <span class="methodname">insertGbaseItem()</span> method
                for the Base service:
            </p>

            <pre class="programlisting brush: php">
$service = new Zend_Gdata_Gbase($client);
$newEntry = $service-&gt;newItemEntry();

// Add title
$title = &quot;PHP Developer Handbook&quot;;
$newEntry-&gt;title = $service-&gt;newTitle(trim($title));

// Add some content
$content = &quot;Essential handbook for PHP developers.&quot;;
$newEntry-&gt;content = $service-&gt;newContent($content);
$newEntry-&gt;content-&gt;type = &#039;text&#039;;

// Define product type
$itemType = &quot;Products&quot;;
$newEntry-&gt;itemType = $itemType;

// Add item specific attributes
$newEntry-&gt;addGbaseAttribute(&quot;product_type&quot;, &quot;book&quot;, &quot;text&quot;);
$newEntry-&gt;addGbaseAttribute(&quot;price&quot;, &quot;12.99 USD&quot;, &quot;floatUnit&quot;);
$newEntry-&gt;addGbaseAttribute(&quot;quantity&quot;, &quot;10&quot;, &quot;int&quot;);
$newEntry-&gt;addGbaseAttribute(&quot;weight&quot;, &quot;2.2 lbs&quot;, &quot;numberUnit&quot;);
$newEntry-&gt;addGbaseAttribute(&quot;condition&quot;, &quot;New&quot;, &quot;text&quot;);
$newEntry-&gt;addGbaseAttribute(&quot;author&quot;, &quot;John Doe&quot;, &quot;text&quot;);
$newEntry-&gt;addGbaseAttribute(&quot;edition&quot;, &quot;First Edition&quot;, &quot;text&quot;);
$newEntry-&gt;addGbaseAttribute(&quot;pages&quot;, &quot;253&quot;, &quot;number&quot;);
$newEntry-&gt;addGbaseAttribute(&quot;publisher&quot;, &quot;My Press&quot;, &quot;text&quot;);
$newEntry-&gt;addGbaseAttribute(&quot;year&quot;, &quot;2007&quot;, &quot;number&quot;);
$newEntry-&gt;addGbaseAttribute(&quot;payment_accepted&quot;, &quot;Google Checkout&quot;, &quot;text&quot;);

$dryRun = true;
$createdEntry = $service-&gt;insertGbaseItem($newEntry, $dryRun);
</pre>

        </div>

        <div class="section" id="zend.gdata.gbase.crud.modify"><div class="info"><h1 class="title">Modify an Item</h1></div>
            

            <p class="para">
                You can update each attribute element of an item as you iterate through them:
            </p>

            <pre class="programlisting brush: php">
// Update the title
$newTitle = &quot;PHP Developer Handbook Second Edition&quot;;
$entry-&gt;title = $service-&gt;newTitle($newTitle);

// Find &lt;g:price&gt; attribute and update the price
$baseAttributes = $entry-&gt;getGbaseAttribute(&quot;price&quot;);
if (is_object($baseAttributes[0])) {
  $newPrice = &quot;16.99 USD&quot;;
  $baseAttributes[0]-&gt;text = $newPrice;
}

// Find &lt;g:pages&gt; attribute and update the number of pages
$baseAttributes = $entry-&gt;getGbaseAttribute(&quot;pages&quot;);
if (is_object($baseAttributes[0])) {
  $newPages = &quot;278&quot;;
  $baseAttributes[0]-&gt;text = $newPages;

  // Update the attribute type from &quot;number&quot; to &quot;int&quot;
  if ($baseAttributes[0]-&gt;type == &quot;number&quot;) {
    $newType = &quot;int&quot;;
    $baseAttributes[0]-&gt;type = $newType;
  }
}

// Remove &lt;g:label&gt; attributes
$baseAttributes = $entry-&gt;getGbaseAttribute(&quot;label&quot;);
foreach ($baseAttributes as $note) {
  $entry-&gt;removeGbaseAttribute($note);
}

// Add new attributes
$entry-&gt;addGbaseAttribute(&quot;note&quot;, &quot;PHP 5&quot;, &quot;text&quot;);
$entry-&gt;addGbaseAttribute(&quot;note&quot;, &quot;Web Programming&quot;, &quot;text&quot;);

// Save the changes by invoking save() on the entry object itself
$dryRun = true;
$entry-&gt;save($dryRun);

// Or, save the changes by calling updateGbaseItem() on the service object
// $dryRun = true;
// $service-&gt;updateGbaseItem($entry, $dryRun);
</pre>


            <p class="para">
                After making the changes, either invoke  <span class="methodname">save($dryRun)</span>
                method on the <span class="classname">Zend_Gdata_Gbase_ItemEntry</span> object or call
                 <span class="methodname">updateGbaseItem($entry, $dryRun)</span> method on the
                <span class="classname">Zend_Gdata_Gbase</span> object to save the changes.
            </p>
        </div>

        <div class="section" id="zend.gdata.gbase.crud.delete"><div class="info"><h1 class="title">Delete an Item</h1></div>
            

            <p class="para">
                You can remove an item by calling  <span class="methodname">deleteGbaseItem()</span> method:
            </p>

            <pre class="programlisting brush: php">
$dryRun = false;
$service-&gt;deleteGbaseItem($entry, $dryRun);
</pre>


            <p class="para">
                Alternatively, you can invoke  <span class="methodname">delete()</span> on the
                <span class="classname">Zend_Gdata_Gbase_ItemEntry</span> object:
            </p>

            <pre class="programlisting brush: php">
$dryRun = false;
$entry-&gt;delete($dryRun);
</pre>

        </div>
    </div>
</div>
        <hr />

            <table width="100%">
                <tr>
                    <td width="25%" style="text-align: left;">
                    <a href="zend.gdata.gapps.html">Using Google Apps Provisioning</a>
                    </td>

                    <td width="50%" style="text-align: center;">
                        <div class="up"><span class="up"><a href="zend.gdata.html">Zend_Gdata</a></span><br />
                        <span class="home"><a href="manual.html">Guia de Refer&ecirc;ncia do Programador</a></span></div>
                    </td>

                    <td width="25%" style="text-align: right;">
                        <div class="next" style="text-align: right; float: right;"><a href="zend.gdata.photos.html">Using Picasa Web Albums</a></div>
                    </td>
                </tr>
            </table>
</td>
        <td style="font-size: smaller;" width="15%"> <style type="text/css">
#leftbar {
	float: left;
	width: 186px;
	padding: 5px;
	font-size: smaller;
}
ul.toc {
	margin: 0px 5px 5px 5px;
	padding: 0px;
}
ul.toc li {
	font-size: 85%;
	margin: 1px 0 1px 1px;
	padding: 1px 0 1px 11px;
	list-style-type: none;
	background-repeat: no-repeat;
	background-position: center left;
}
ul.toc li.header {
	font-size: 115%;
	padding: 5px 0px 5px 11px;
	border-bottom: 1px solid #cccccc;
	margin-bottom: 5px;
}
ul.toc li.active {
	font-weight: bold;
}
ul.toc li a {
	text-decoration: none;
}
ul.toc li a:hover {
	text-decoration: underline;
}
</style>
 <ul class="toc">
  <li class="header home"><a href="manual.html">Guia de Refer&ecirc;ncia do Programador</a></li>
  <li class="header up"><a href="manual.html">Guia de Refer&ecirc;ncia do Programador</a></li>
  <li class="header up"><a href="reference.html">Refer&ecirc;ncia do Zend Framework</a></li>
  <li class="header up"><a href="zend.gdata.html">Zend_Gdata</a></li>
  <li><a href="zend.gdata.introduction.html">Introduction</a></li>
  <li><a href="zend.gdata.authsub.html">Authenticating with AuthSub</a></li>
  <li><a href="zend.gdata.books.html">Using the Book Search Data API</a></li>
  <li><a href="zend.gdata.clientlogin.html">Authenticating with ClientLogin</a></li>
  <li><a href="zend.gdata.calendar.html">Using Google Calendar</a></li>
  <li><a href="zend.gdata.docs.html">Using Google Documents List Data API</a></li>
  <li><a href="zend.gdata.health.html">Using Google Health</a></li>
  <li><a href="zend.gdata.spreadsheets.html">Using Google Spreadsheets</a></li>
  <li><a href="zend.gdata.gapps.html">Using Google Apps Provisioning</a></li>
  <li class="active"><a href="zend.gdata.gbase.html">Using Google Base</a></li>
  <li><a href="zend.gdata.photos.html">Using Picasa Web Albums</a></li>
  <li><a href="zend.gdata.youtube.html">Using the YouTube Data API</a></li>
  <li><a href="zend.gdata.exception.html">Catching Gdata Exceptions</a></li>
 </ul>
 </td>
    </tr>
</table>

<script type="text/javascript" src="../js/shCore.js"></script>
<script type="text/javascript" src="../js/shAutoloader.js"></script>
<script type="text/javascript" src="../js/main.js"></script>

</body>
</html>